from django.contrib import admin
from django.urls import path, include
from rest_framework import routers

from drfstudy.views import StudentViewSet, ClassViewSet

urlpatterns = [
    # path("students/",StudentViewSet.as_view({"get":"list","post":"create"})),
    # path("students/<pk>/",StudentViewSet.as_view({"get":"retrieve","put":"update","delete":"destroy"})),

]
router = routers.DefaultRouter()
router.register(r'students', StudentViewSet)
router.register(r"classes", ClassViewSet)
urlpatterns += router.urls
